package sort;

import java.util.*;

public class ApiSort {
    public static void main(String[] args) {



        Arrays.sort(new int[]{1,52,9});


        List<Integer> list = new ArrayList<>();

        list.add(1);
        list.add(10);
        list.add(5);

        Collections.sort(list);

        Collections.sort(list, new Comparator<Integer>() {
            @Override
            public int compare(Integer o1, Integer o2) {
                return o1 > o2 ? -1 : (o1 < o2 ? 1 : 0);
            }
        });

        System.out.println(list);
    }

}
